package model

// AuthIdRes 权限请求后返回id
type AuthIdRes struct {
	Id int64 `json:"id" dc:"权限id"  v:"required#权限ID必填" `
}

// AuthInfo 新增权限的实体
type AuthInfo struct {
	AuthName      string `json:"authName" dc:"权限名称"  v:"required|length:1,20#权限名称必填|权限名字应该1~20字之间"   `
	AuthCode      string `json:"authCode" dc:"权限Code"  v:"required#权限Code必填"`
	AuthRemark    string `json:"authRemark" dc:"权限备注"  v:"length:1,50#权限备注应该1~50字之间" `
	AuthSort      int64  `json:"authSort"    dc:"权限的排序"  v:"required#权限排序必填"`
	AuthIcon      string `json:"authIcon"    dc:"权限的图标"`
	AuthRouter    string `json:"authRouter"   dc:"菜单的路由"  `
	AuthComponent string `json:"authComponent"  dc:"菜单的组件路径"`
	AuthType      int64  `json:"authType"   dc:"权限的类型 1 菜单  2 按钮  3 目录" v:"required|in:1,2,3#权限的类型必填|权限类型需要按照类型填写" `
	ParentId      int64  `json:"parentId" dc:"父级id" d:"0" v:"required#父级id必填"`
	AuthStatus    int    `json:"authStatus"    dc:"权限的状态 0 禁用  1 启用" v:"required|in:1,0#权限状态必填|权限外链需要按照类型填写"`
	AuthLink      int    `json:"authLink"   dc:"权限的外链  0 否 1 是"  v:"in:1,0#权限外链需要按照类型填写"`
	AuthCache     int    `json:"authCache"   dc:"权限的缓存  0 禁用 1 启用" v:"in:1,0#权限缓存需要按照类型填写"`
	AuthDisplay   int    `json:"authDisplay"  dc:"权限的显示  0 隐藏 1 显示" v:"in:1,0#权限显示需要按照类型填写"`
}

type AuthInfoAndIdRes struct {
	*AuthInfo
	AuthIdRes
}

type AuthTreeInfoRes struct {
	*AuthInfoAndIdRes
	Children []AuthTreeInfoRes `json:"children"`
}

// AuthIdsRes 权限请求后返回id
type AuthIdsRes struct {
	AuthIds []int64 `json:"authIds" dc:"权限id数组"  v:"required#权限ID必填" `
}
